<template>
  <div class="content">
    <myNavbar title="子账号注册"></myNavbar>
    <div class="login_content">
      <div class="button_content">
        <div class="button_phone">
          <input placeholder="请输入登录账号" class="phone_input" placeholder-color="#000000"  v-model="username"	/>
        </div>
        <div class="button_phone">
          <input placeholder="请输入登录密码" class="phone_input"  placeholder-color="#000000"  v-model="password" style="placeholder-color:#000000"/>
        </div>
        <div class="button_phone">
          <input placeholder="请输入邀请人账号" class="phone_input"  placeholder-color="#000000"  v-model="code" style="placeholder-color:#000000"/>
        </div>
      </div>
      <div style="margin-top: 40px" class="login_click botton_Bg_Color" @click="userloginClick">
        <text class="login_click_title">添加子账号</text>
      </div>
    </div>
  </div>
</template>

<script>
import {save} from '@/api/subUser';
import myNavbar from "@/components/myNavbar/myNavbar.vue";
import md5 from 'js-md5';

export default {
  data() {
    return {
      code: '',
      password2: '',
      userName: "",
      password: "",
      loginCode: "",

      imeiId: '',

    }
  },
  components: {myNavbar},
  created() {

  },
  mounted() {
    this.imeiId = this.getImei()

  },
  methods: {
    userloginClick() {

      var _this = this
      if (this.isNull(_this.username)) {
        eeui.toast('请输入登录账号')
        return;
      }
      if (this.isNull(_this.password)) {
        eeui.toast('请输入登录密码')
        return;
      }

      save({
        username: this.username,
        password: md5(this.password),
        xuid: this.xuid,
        code: this.code,
        mchId: _this.getGlobalData().mchId,
      }).then(res => {
        eeui.closePage()
      })


    },
  }
}
</script>
<style lang="css" src="../../../style/wx.css"/>
<style scoped>
.content {
  flex: 1;
  background-color: rgba(248, 248, 248, 0.8);
}

.login_content {
  padding-top: 20px;
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 1;
}

.login_click {
  width: 650px;
  height: 84px;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.login_click_title {
  font-size: 32px;
  font-weight: 400;
  color: rgba(255, 255, 255, 1);
}


.button_content {
  display: flex;
  flex-direction: column;
  margin-left: 0px;
}

.button_phone {
  width: 654px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  height: 106px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: rgba(212, 215, 220, 1);
}

.phone_input {
  width: 564px;
  font-size: 32px;
  font-weight: 400;
  /*color: rgba(26, 26, 30, 1);*/
  line-height: 48px;
  /*opacity: 0.4;*/
}

.placeholderClass{
  color: red;
}
</style>
